<template>
  <div class="">
    <Topnav></Topnav>
    <div class="banner">
      <h1 class="banner-title">Xiaowu-ui</h1>
      <h2 class="banner-des">基于vue3.0的UI框架</h2>
      <p class="actions">
        <a href="https://github.com">github</a>
        <router-link to="/doc/intro">开始</router-link>
      </p>
    </div>
    <ul class="banner-intro">
      <li>
        <div class="intro-img">
          <svg class="icon">
            <use xlink:href="#icon-vue"></use>
          </svg>
        </div>
        <div class="intro-des">
          <h2>基于 Vue 3</h2>
          <p>使用了 Vue 3 Composition API</p>
        </div>
      </li>
      <li>
        <div class="intro-img">
          <svg class="icon">
            <use xlink:href="#icon-ts"></use>
          </svg>
        </div>
        <div class="intro-des">
          <h2>基于 TypeScript</h2>
          <p>源代码采用 TypeScript 书写</p>
        </div>
      </li>
      <li>
        <div class="intro-img">
          <svg class="icon">
            <use xlink:href="#icon-tool"></use>
          </svg>
        </div>
        <div class="intro-des">
          <h2>代码易读</h2>
          <p>每个组件的源代码都极其简洁</p>
        </div>
      </li>
    </ul>
  </div>
</template>

<script lang="ts">
import Topnav from "../components/Topnav.vue";
export default {
  components: { Topnav },
};
</script>
<style lang="scss" scoped>
.banner {
  padding: 195px 0px 95px;
  display: flex;
  justify-content: center;
  align-items: center;
  flex-direction: column;
  background-image: linear-gradient(to right, #f83600 0%, #f9d423 100%);
  > .banner-title {
    font-size: 26px;
    color: white;
  }
  > .banner-des {
    font-size: 25px;
    color: white;
    margin-bottom: 10px;
  }
  > .actions {
    padding: 8px 0;
    a {
      display: inline-block;
      height: 32px;
      line-height: 32px;
      margin: 0 8px;
      padding: 0 16px;
      background: orange;
      border-radius: 16px;
      color: white;
    }
    a:hover {
      border-bottom: 1px solid white;
    }
  }
}
.banner-intro {
  display: flex;
  flex-wrap: wrap;
  margin: 20px auto;
  justify-content: center;
  > li {
    color: #6f486b;
    margin: 16px 0;
    display: grid;
    justify-content: start;
    align-content: space-between;
    grid-template-areas:
      "icon title"
      "icon text";
    grid-template-columns: 80px auto;
    grid-template-rows: 1fr auto;
    margin-right: 50px;
    > .intro-img {
      grid-area: icon;
      width: 64px;
      height: 64px;
      svg {
        width: 64px;
        height: 64px;
      }
    }
    > .intro-des {
      h2 {
        grid-area: title;
        font-size: 28px;
      }
      p {
        grid-area: text;
      }
    }
  }
}
</style>